package com.becca.cake.dao.recommend;

import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.becca.cake.model.goods.GoodsRecommendModel;

/**
 * 商品推荐DAO接口
 * @copyright  尊星(上海)信息科技有限公司
 * @author yellow
 * @date 2016年6月2日 下午7:01:34
 */
@Repository
public interface RecommendDAO {
    /**
     * 商品推荐查询
     * @param map
     * @return
     * @throws DataAccessException
     */
    List<GoodsRecommendModel> selectRecommends(Map<String, Object> map) throws DataAccessException;
    
    /**
     * 获取查询商品推荐数据列表总条数
     * @param map
     * @return
     * @throws DataAccessException
     */
    Long selectRecommendsCount(Map<String, Object> map) throws DataAccessException;

    /**
     * 添加商品推荐信息
     * @param GoodsRecommendModel
     * @throws DataAccessException
     */
    void insertRecommend(GoodsRecommendModel goodsRecommendModel) throws DataAccessException;

    /**
     * 根据id查询商品推荐对象
     * @param RecommendId
     * @return
     * @throws DataAccessException
     */
     Long selectRecommendById(GoodsRecommendModel goodsRecommendModel) throws DataAccessException;
    
    /**
     * 批量修改排序
     * @param map
     * @throws DataAccessException
     */
     void updateOrders (List<GoodsRecommendModel> list) throws DataAccessException;
     
     
     /**
      * 推荐或取消推荐
      * @param map
      * @throws DataAccessException
      */
      void updateRecommendStatusById (Map<String, Object> map) throws DataAccessException;
      
      /**
       * 热门或取消热门
       * @param map
       * @throws DataAccessException
       */
       void updateRecommendIsHotById (Map<String, Object> map) throws DataAccessException;
}
